import {lazy} from 'react'

const routes=[
    {
        path:'/',
        to:'/home'
    },
    {
        path:'/home',
        component:lazy(()=>import('../views/home/Home')),
        children:[
            {
                path:'/home',
                to:'/home/index'
            },
            {
                path:'/home/index',
                component:lazy(()=>import('../views/home/index/Index')),
            },
            {
                path:'/home/classify',
                component:lazy(()=>import('../views/home/classify/Classify')),
            },
            {
                path:'/home/shopcar',
                component:lazy(()=>import('../views/home/shopcar/Shopcar')),
            },
            {
                path:'/home/my',
                component:lazy(()=>import('../views/home/my/My')),
            },
        ]
    },
    {
        path:'/login',
        component:lazy(()=>import('../views/login/Login'))
    },
    {
        path:'/details/:id',
        component:lazy(()=>import('../views/details/Details'))
    },
]
export default routes